<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
 
</head>
<body>
  <div id="app">
    <div v-for="(floor, index) in floors">
      <h5>
        {{floor.title}}
      </h5>
      <ul>
        <li v-for="(item, i) in floor.items">
          <h3>这是第{{index+1}}楼</h3>
          <h6>商品名: {{item.name}}</h6>
          <p>价格: {{item.price}}</p>
        </li>
      </ul>
    </div>
  </div>
  <script src="./vue.global.js"></script>
  <script>
    const { createApp } = Vue;
    const app = createApp({
      data(){
        return {
          floors: [
            {
              title:'第一楼',
              items: [
                {
                  name: '第一楼商品1',
                  price: 10
                },
                {
                  name: '第一楼商品2',
                  price: 20
                },
                {
                  name: '第一楼商品3',
                  price: 10
                }
              ]
            },
            {
              title:'第2楼',
              items: [
                {
                  name: '第2楼商品1',
                  price: 10
                },
                {
                  name: '第2楼商品2',
                  price: 20
                },
                {
                  name: '第2楼商品3',
                  price: 10
                }
              ]
            },
            {
              title:'第3楼',
              items: [
                {
                  name: '第3楼商品1',
                  price: 10
                },
                {
                  name: '第3楼商品2',
                  price: 20
                },
                {
                  name: '第3楼商品3',
                  price: 10
                }
              ]
            }
          ]
        }
      }
    })
    app.mount('#app')
  </script>
</body>
</html>